package kr.hkit.powerjava.chapter10;

import java.util.Arrays;
import java.util.Random;

public class Lotto {
	private int [] arr;
	private static final int SIZE = 6;
	private Random rnd;
	public Lotto() {
	arr= new int[Lotto.SIZE];
	rnd = new Random();
	}
	
	public void getlottoNum(){
		for (int i=0; i<arr.length; i++){
			arr[i]=rnd.nextInt(45)+1;
		}
	
	}
	public boolean isFind(int searchNum){
		boolean isEquals = false;
		for(int i=0 ; i < arr.length; i++){
			if(searchNum == arr[i]){
				isEquals = true;
				break;
				
				
				
			}
		}
	
	}
	
	
	@Override
	public String toString() {
		return "Lotto [arr=" + Arrays.toString(arr) + "]";
	}

	public static void main(String[] args) {
		Lotto lo =new Lotto();
		System.out.println(lo);
		lo.getlottoNum();
		System.out.println(lo);
		
		Random rnd = new Random();
		int i = rnd.nextInt(45);
		System.out.println(i);
	
	}
	

}
